1. Field
The disclosure relates to a method, system, and article of manufacture for detecting data integrity.
2. Background
A computational device, such as, a storage controller, may write and store data in one or more storage devices. When data is stored in a storage device, data integrity refers to the validity of stored data. Data integrity may be compromised in a number of ways. Errors may occur when data is transmitted from the computational device to the storage device. Hardware malfunctions, such as, disk crashes may invalidate the data. Natural disasters, such as, fires and floods or power outages may also invalidate the data. Threats to data integrity may be reduced by backing up data regularly, by controlling access to data via security mechanisms, by applying error detection and correction mechanisms, etc. For example, Redundant Array of Independent Disks (RAID) is a mechanism for ensuring data integrity by making disks fault tolerant for disaster recovery in a disk storage system. In RAID level 5, the parity corresponding to data on a plurality of disks may be computed and the parity may be used to recover from a disk failure without losing any data.
One of the ways in which data integrity can be lost occurs when data being written to one or more storage devices is interrupted during the transfer of data to the one or more storage devices. For example, a power failure may occur during the process of data transfer and cause data integrity to be lost. In particular, if the partially transferred data is treated as a valid data then a problem of data integrity may arise.
In many situations, in which a computational device, such as, a storage controller, writes data to one or more storage devices, the data written may span a plurality of sectors, where a sector is a unit of data storage. For example, in certain situations the data written to a computational device may be over 10 Kilobytes in size. In such a situation, if there is a power failure or some other error during the process of writing data, then data integrity of the data stored in the one or more storage devices may be lost.